package com.itdct.onflow.core.constant

/**
 * Created by DCT-Portable on 2021/4/7 22:57.
 * Usage:
 */
object CommonString {
    const val SUCCESS: String = "success"
    const val FAIL: String = "fail"
    const val IP_ADDRESS: String = "ipAddress"

    const val CODE: String = "code"
    const val INFO: String = "info"

    //返回相关
    const val ID: String = "id"
    const val ENTITY: String = "entity"

    //列相关
    const val LIST: String = "list"
    const val PAGE_SIZE: String = "pageSize"
    const val PAGE_NUM: String = "pageNum"
    const val TOTAL_COUNT: String = "totalCount"
    const val TOTAL_PAGE: String = "totalPage"
    const val KEYWORD: String = "keyword"

    //错误信息
    const val REQUIRE_ID: String = "请输入id"
    const val ENTITY_NOT_FOUND = "该对象不存在或已经被删除"
    const val REQUIRE_DELETE_ID_LIST: String = "请输入需要删除的id列表"
    const val ENTITY_ALREADY_DELETED: String = "该对象已被删除"
    const val FILE_NOT_FOUND: String = "无法找到该文件"
    const val LACK_PARAM: String = "缺少请求参数"
    const val SYS_UNKNOWN_ERROR: String = "系统异常，请稍后重试"
    const val JSON_INPUT_DATA_ERROR: String = "入参异常，无法解析"
    const val PERMISSION_FORBIDDEN: String = "您没有权限执行该操作"
    const val NEED_LOGIN: String = "执行该操作需要先登录"
    const val DONT_HAVE_PERMISSION: String = "您没有执行该操作的权限"

    val ENTITY_NOT_FOUND_USAGE: (usage: String, id: Long) -> String = { usage: String, id: Long ->
        "该${usage}对象ID为${id}，不存在或已经被删除"
    }

}
